﻿using System;
using System.Collections.Generic;
using PagingControl.JSon;

namespace JQueryPractice
{
    public partial class CommonControls : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var persons = new List<Person>();
            for (int i = 0; i < 10; i++)
            {
                var address = new Address { Country = "US", State = "CA", City = "NewYork" };
                var person = new Person { Name = "Jack", Gender = "Male", DOB = DateTime.Now.AddYears(-30), Address = address };
                persons.Add(person);
            }
            gird.BindData(persons);
        }

        protected void Sort(List<Person> persons)
        {
            persons.Sort(Compare);
        }

        private int Compare(Person x,Person y)
        {
            return 0;
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            filterGroup.AddFilter("Assigned to me", GetAssignedToMe);
            filterGroup.AddFilter("Unassigned", GetUnassigned);
        }
        private void GetAssignedToMe()
        {
        }

        private void GetUnassigned()
        {
        }
    }
}
